﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NCP.Infrastructure.Common.Specification;

namespace NCP.Recruiting.Domain.Aggregates.Companies {
    public static class CompanySpecifications {

        public static ISpecification<Company> CompanyUser(string username) {
            return new DirectSpecification<Company>(c => c.Username == username);
        }

        public static Specification<Company> EmployeesMoreThan(int employees) {
            return new DirectSpecification<Company>(c => c.Employees > employees);
        }

        /// <summary>
        /// 企业ID检索
        /// </summary>
        /// <param name="id">企业ID</param>
        /// <returns></returns>
        public static Specification<Company> GetByCompanyId(Guid CompanyId)
        {
            return new DirectSpecification<Company>(c => c.Id == CompanyId);
        }
    }
}
